"use strict";
const crypto = require("crypto");
module.exports = (app) => {
    const { STRING, INTEGER, DATE, ENUM } = app.Sequelize;
    // 配置（重要：一定要配置详细，一定要！！！）
    const Feedback = app.model.define("feedback", {
        id: {
            type: INTEGER(30).UNSIGNED,
            primaryKey: true,
            autoIncrement: true
          },
          wx_id:{
            type: INTEGER(30),
            allowNull: false,
            defaultValue:0,
            comment: '微信id',
          },
          wxname: {
            type: STRING(100),
            allowNull: false,
            defaultValue:'',
            comment: '微信昵称',
          },
          type: {
            type: STRING(200),
            allowNull: false,
            defaultValue: '',
            comment: '反馈类型',
          },
          content: {
            type: STRING(200),
            allowNull: false,
            defaultValue: '',
            comment: '内容',
          },
          images: {
            type: STRING(1000),
            allowNull: false,
            defaultValue: '',
            comment: '图片',
          },
          created_at: DATE,
          updated_at: DATE,

    });

    // 定义关联关系
    // Consume.associate = function (model) {
    //     Shop.belongsTo(app.model.Class);
        
    // };
    return Feedback;
};
